package com.wxg.SpringActiveMQ.mq.consumer.queue;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;

import org.springframework.stereotype.Component;

@Component()
public class QueueReceiver1 implements MessageListener{

	@Override
	public void onMessage(Message message) {
		try {
			System.out.println( String.format("QueueReceiver1接收到消息：%s", ((TextMessage)message).getText()) );
		} catch (JMSException e) {
			e.printStackTrace();
		}
	}

}
